﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package net.wooga.pets.controllers.world {
    import flash.events.*;
    import net.wooga.pets.events.*;
    import net.wooga.pets.models.*;
    import net.wooga.pets.constants.*;
    import org.robotlegs.mvcs.*;
    import net.wooga.pets.models.world.*;

    public class RemovePatientCommand extends Command {

        public var event:InfoEvent;
        public var world:WorldModel;
        public var user:UserModel;

        override public function execute():void{
            if (!this.user.isVisitFriendsMode()){
                this.world.removeActor(this.event.id);
                dispatch(new InfoEvent(EventConstants.ON_HOSPITAL_LEFT, this.event.id));
                dispatch(new Event(EventConstants.UPDATE_MORE_PETS_ARROW));
            };
        }

    }
}//package net.wooga.pets.controllers.world 
